from django.db import models
from login.models import UserModel
from goods.models import Product
# Create your models here.
class Order(models.Model):
    order_id = models.CharField(max_length=100, verbose_name='订单号')
    order_status = models.CharField(max_length=100, verbose_name='订单状态')
    order_price = models.DecimalField(max_digits=10, decimal_places=2, verbose_name='订单价格')
    order_time = models.DateTimeField(verbose_name='订单时间')
    order_user = models.ForeignKey(UserModel, on_delete=models.CASCADE, verbose_name='订单用户')
    order_product = models.ForeignKey(Product, on_delete=models.CASCADE, verbose_name='订单商品')
    class Meta:
        db_table = 'orders'
        verbose_name = '订单表'







